Fix build issue due to missing VK_RESULT_RANGE_SIZE
authorAdrian Perez de Castro <aperez@igalia.com>
Mon, 11 May 2020 07:07:41 +0000 (10:07 +0300)
committerAdrian Perez de Castro <aperez@igalia.com>
Mon, 11 May 2020 07:07:41 +0000 (10:07 +0300)
Conditionally check whether the Vulkan headers version defines
VK_RESULT_RANGE_SIZE, and avoid using it for version >=140. The
following comming in Vulkan-Headers has removed the enum value:

  https://github.com/KhronosGroup/Vulkan-Headers/commit/0c5351f5e9114d3e9033aeae51d036a3d201c082#diff-4febd94c0666d59030d8b1dd20c72403

gdk/gdkvulkancontext.c

index 7112e6724d65cbbda9d8b4b6dbb7be01130ab54c..be249fcc25e1ec77beb3ba21f2b75f229074f983 100644 (file)
@@ -223,7 +223,9 @@ gdk_vulkan_strerror (VkResult result)
     case VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT:
       return "A requested pipeline creation would have required compilation, but the application requested compilation to not be performed.";
 #endif
+#if VK_HEADER_VERSION < 140
     case VK_RESULT_RANGE_SIZE:
+#endif
     case VK_RESULT_MAX_ENUM:
     default:
       return "Unknown Vulkan error.";